# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'Module'
        db.create_table(u'module_module', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('platform', self.gf('django.db.models.fields.CharField')(default='All', max_length=10)),
            ('mid', self.gf('django.db.models.fields.IntegerField')()),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('position', self.gf('django.db.models.fields.PositiveIntegerField')()),
            ('type', self.gf('django.db.models.fields.SmallIntegerField')(default=0)),
            ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('lastest_version', self.gf('django.db.models.fields.CharField')(default='0.0.0', max_length=10)),
            ('lastest_updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(1970, 1, 1, 0, 0))),
        ))
        db.send_create_signal(u'module', ['Module'])

        # Adding model 'Version'
        db.create_table(u'module_version', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('version', self.gf('django.db.models.fields.CharField')(max_length=10)),
            ('alias', self.gf('django.db.models.fields.CharField')(max_length=10)),
            ('comment', self.gf('django.db.models.fields.TextField')()),
            ('updated', self.gf('django.db.models.fields.DateTimeField')()),
            ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
            ('module', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['module.Module'])),
        ))
        db.send_create_signal(u'module', ['Version'])


    def backwards(self, orm):
        # Deleting model 'Module'
        db.delete_table(u'module_module')

        # Deleting model 'Version'
        db.delete_table(u'module_version')


    models = {
        u'module.module': {
            'Meta': {'ordering': "('position',)", 'object_name': 'Module'},
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'lastest_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1970, 1, 1, 0, 0)'}),
            'lastest_version': ('django.db.models.fields.CharField', [], {'default': "'0.0.0'", 'max_length': '10'}),
            'mid': ('django.db.models.fields.IntegerField', [], {}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'platform': ('django.db.models.fields.CharField', [], {'default': "'All'", 'max_length': '10'}),
            'position': ('django.db.models.fields.PositiveIntegerField', [], {}),
            'type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
        },
        u'module.version': {
            'Meta': {'object_name': 'Version'},
            'alias': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
            'comment': ('django.db.models.fields.TextField', [], {}),
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'module': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['module.Module']"}),
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
            'version': ('django.db.models.fields.CharField', [], {'max_length': '10'})
        }
    }

    complete_apps = ['module']